package com.plian.system.entity.im;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.plian.Tools.DateUtil;
import com.plian.system.mybatis.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @description: 有效投资
 * @author: gangan
 * @create: 2020-04-27 09:47
 */
@Data
@TableName("im_effective_investment")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "EffectiveInvestment对象", description = "有效投资")
public class EffectiveInvestment extends BaseEntity {
    private static final long serialVersionUID = 1L;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "主表id")
    private Long baseInvestmentExecutionId;

    /**
     * 有效投资计划
     */
    @TableField(value = "plan_effective_investment", updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty(value = "有效投资计划", required = true)
    private BigDecimal planEffectiveInvestment;
    /**
     * 至上月底累计完成投资
     */
    @TableField(value = "last_complete_investment", updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty(value = "至上月底累计完成投资", required = true)
    private BigDecimal lastCompleteInvestment;

    /**
     * 至上月底累计完成投资 固定资产投资
     */
    @TableField(value = "last_complete_fixed_investment", updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty(value = "至上月底累计完成投资 固定资产投资", required = true)
    private BigDecimal lastCompleteFixedInvestment;

    /**
     * 至上月底累计完成投资 对外股权投资
     */
    @TableField(value = "last_complete_equity_investment", updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty(value = "至上月底累计完成投资 对外股权投资", required = true)
    private BigDecimal lastCompleteEquityInvestment;

    /**
     * 本月完成投资
     */
    @TableField(value = "complete_investment", updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty(value = "本月完成投资", required = true)
    private BigDecimal completeInvestment;

    /**
     * 本月完成投资 固定资产投资
     */
    @TableField(value = "complete_fixed_investment", updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty(value = "本月完成投资 固定资产投资", required = true)
    private BigDecimal completeFixedInvestment;

    /**
     * 本月完成投资 对外股权投资
     */
    @TableField(value = "complete_equity_investment", updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty(value = "本月完成投资 对外股权投资", required = true)
    private BigDecimal completeEquityInvestment;

    /**
     * 至本月本年累计完成投资
     */
    @TableField(value = "all_complete_investment", updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty(value = "至本月本年累计完成投资", required = true)
    private BigDecimal allCompleteInvestment;

    /**
     * 至本月本年累计完成投资 固定资产投资
     */
    @TableField(value = "all_complete_fixed_investment", updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty(value = "至本月本年累计完成投资 固定资产投资", required = true)
    private BigDecimal allCompleteFixedInvestment;

    /**
     * 至本月本年累计完成投资 对外股权投资
     */
    @TableField(value = "all_complete_equity_investment", updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty(value = "至本月本年累计完成投资 对外股权投资", required = true)
    private BigDecimal allCompleteEquityInvestment;

    /**
     * 填报人
     */
    @ApiModelProperty(value = "填报人")
    private String informant;

    /**
     * 联系电话
     */
    @ApiModelProperty(value = "联系电话")
    private String number;

    /**
     * 填报日期
     */
    @DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
    @JsonFormat(pattern = DateUtil.PATTERN_DATE)
    @TableField(value = "filing_date", updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty(value = "填报日期")
    private Date filingDate;

    @TableField(exist = false)
    private List<MainProjectSituation> mainProjectSituations;

    /**
     * 固定资产投资项目情况
     */
    @TableField(exist = false)
    private List<ExecutionProjectSituation> fixedProjectSituations;

    /**
     * 股权投资项目情况
     */
    @TableField(exist = false)
    private List<ExecutionProjectSituation> stakeProjectSituations;
}
